1. Field of the Invention
This invention relates generally to a simulator capable of simulating, predicting, and/or controlling the system performance of a time-progressive material-energy system. More particularly, this invention teaches a stochastic simulator to perform real-time simulation, prediction or control of a spatially inhomogeneous system by fully utilizing the data storage capacity and processing power provided by an on-line computer system.
2. Description Of the Prior Art
The usefulness of a simulator for a highly dynamic and complex system is often limited to design or training but seldom used for real time control. There is an intrinsic limitation, namely, the processing time required to propagate the system by a simulator in many cases is slower than the rate of occurrence of the real events taking place in the simulated system thus preventing the simulators from being used on a real time basis.
The usefulness of a conventional simulator is also limited by the fact that a simulator in most cases is `system specific`, i.e. a simulator is constructed to only simulate a system with certain geometrical configurations, material compositions, physical or chemical processes, and dynamic characteristics with very limited ranges of flexibility. A simulator originally designed to be implemented on a certain combination of hardware and software for simulating a specific system is generally very rigid in its data structures and processes of operations so that the simulator can not easily be converted to either simulate a different system or be implemented on a different combination of hardware and software architectures. With the widespread use of the more intelligent processors and the increased capacity of data storage and computer networks to enhance the speed and performance of distributed parallel and concurrent data processing, rigid data structures and inflexible simulation processes pose a major hindrance preventing the simulator art from taking advantage of the ever increased data processing power and data storage capacity provided by the modern electronic and computer industry.
A simulator for simulating and predicting the state of a time-dependent material-energy system can be a very difficult and time consuming task for several reasons. Traditionally, a mathematical formulation which often involves a set of complicated and dynamically interactive differential equations is used to explicitly represent various space and time-dependent processes which may occur under a variety of system conditions. Explicitly means that all the information predetermined to be necessary to represent the entire system is actively determined for each time step for the simulation. To do this, the simulator performs a process to solve this set of differential equations by using a finite difference or finite element method to obtain the numerical solutions. For complex systems in particular, simulation and prediction inaccuracies may result from either the approximation errors caused by the finite difference or finite element solution methodologies or from the fact the differential equations may not accurately represent the system behavior at all times in all locations over the entire system.
Instead of treating the simulation of a time-dependent material-energy system as a mathematical solution process, stochastic simulators have been developed. These operate by continuously and dynamically tracing a set of individual events which may occur over the time-span of simulation. The simulator makes an assumption that each event has a certain probability of occurrence which is determined by the system conditions and material properties at a specific point of time. In a predefined time-window which is commonly referred to as a time step, any one of the simulated events may occur. There is, on the average, one occurrence of an event within a time step when the length of that time step is selected to be equivalent to the inverse of the total probability of occurrence of all events. The likelihood of occurrence of certain event within that time step is proportional to the probability of occurrence of that individual event. A stochastic simulator commonly comprises at least one processor which is capable of defining a time step and then randomly selecting an event as a triggering-event for that time step. The likelihood of an event being randomly selected is proportional to the probability of occurrence of the selected event relative to that of the other events. As the consequence of the occurrence of the selected event, the processor updates the system conditions by use of material property tables, system process equations and other required data groups stored in at least one data storage apparatus. The processor then selects a new time step and repeats the event selection and system condition update processes to propagate a system through the entire time span for system simulation.
A stochastic simulator was first used to simulate a spatially homogeneous chemical system where many chemical reactions occur (D. L. Bunker et al., Combustion and Flame, Vol. 23, p. 373 ff., 1974). The probability of an individual chemical reaction is dependent on the concentrations of a variety of chemical reactants. The functional dependence and the concentrations are stored in the storage apparatus. The processor generates a random number to select among various chemical reactions a specific reaction in each time step thus allowing the simulation to propagate in time. The time base for determining the length of time step is based on the total sum of all reaction probabilities. Two specific embodiments of this type of simulator are described in documents available from Quantum Chemistry Program Exchange (Indiana University) as Simulator 293 and Simulator QCMP069.
The tasks performed by a simulator according to Bunker et al. are divided into many stages as illustrated in Appendix A where a stochastic simulator is used to simulate a spatially homogeneous chemical reactor 10 (FIG. 1). The chemical reactor 10 may be described as a very small volume containing a limited but adequate number of molecules 12 of the various species involved in a set of chemical reactions. The initial state of this volume, e.g. temperature, pressure and concentrations, is stored in the data storage apparatus of the simulator (see Appendix A, step (b) of stage 1). The intrinsic characteristics of the system, e.g. the allowed reaction pathways and their rate of occurrence (step (a)), are also stored in the storage apparatus of the simulator as a plurality of system process arrays. The processor first computes the initial probabilities from the initial state and the system process arrays. The processor then propagates the simulation by stochastically selecting one event at a time and iteratively executing the sequence of steps listed in stage 3. The simulator then generates a data group for storage in the data storage apparatus in stage 4 representing the state of the chemical reactor at each time step when the processor completes the simulation steps listed in stage 3.
FIGS. 2A, 2B and 2C schematically illustrate the event selection operation used by Bunker et al. for simulating the chemical reactor 10 which comprises three chemical reactions, numbered as reactions 1, 2 and 3, the reaction sharing reaction rates of R.sub.1, R.sub.2 and R.sub.3 respectively, defined by rate constants k.sub.1, k.sub.2 and k.sub.3 and the instantaneous concentrations of the species A, B, and C. The rates R.sub.n can be considered to be the probabilities of reactions 1 to 3 occurring per second, and the total probability P (per second) is then the sum R.sub.1 +R.sub.2 +R.sub.3. Since the mean probability of an event occurring in the time period 1/P is unity, that period is taken as the time step for a single event and the elapsed time in the simulation is advanced by that amount (FIG. 2B). The processor uses a random number to select one of the three reactions. Depending on the value of the random number any of the three reactions can be selected (FIG. 2C), with the likelihood for selection of a given reaction equal to its contribution to the total probability P. This is represented by the lengths of the line segments in FIG. 2C.
Another chemical simulator has been developed by Gillespie wherein the simulator generates two random numbers; one for identifying a chemical reaction and another for properly weighting the time base used for time step determination. (Journal of Computational Physics, Vol. 22, No. 4, pp. 403-434, 1976). Better accuracy is achieved because the time step is dynamically weighted by the probability of occurrence for each individual event.
The stochastic simulators disclosed by Bunker and Gillespie are both homogeneous simulators which can only be used to simulate spatially homogeneous systems. Gillespie proposes to generalize the application of these stochastic simulators to spatially inhomogeneous chemical reactions by first dividing the simulated system into a plurality of subvolumes and allowing the chemical reactions to proceed "independently" in several subvolumes. The mass transport of reactants and reaction products between the subvolumes are proposed to be assigned with probabilities in a manner similar to that used for the individual chemical reaction steps. A 3-dimensional probability function has to be used, reflecting both a reaction step and a physical location. The proposed simulator is required to stochastically select a specific subvolume as well as a specific reaction step to propagate the chemical reaction throughout the entire system in time. A simulator as proposed by Gillespie thus would be required to simultaneously process three random selection processes; one for the selection of subvolumes, one for reaction type and one for time step weighting. Since the proposed simulator selects the reaction step independently from the selection of a particular subvolume, the time step obtained after the random time-step weighting process may be constrained by the selected subvolume and therefore may not be appropriate for other subvolumes wherein other reaction steps may have rates of reactions significantly different than that of the selected volume. The proposed simulator would thus have difficulties in determining a common time base for defining a time step for the entire system. Recognizing this limitation, Gillespie states that application of the proposed simulator to inhomogeneous chemical systems is limited to tubular systems with very similar subvolumes where differences in time evolution of the various subvolumes would be small.
Various discrete simulation technologies for chemical kinetics are reviewed by J. Turner, Journal of Physical Chemistry, Vol. 81, No. 25, pp. 2379-2408, 1978). Turner briefly discusses the space-dependent stochastic simulation methods with a specific reference to the simulator proposed by Gillespie and proposes a method which is essentially an extension of a one-dimensional system similar to that of Gillespie. It is obvious to those of ordinary skill in the art that a spatially inhomogeneous stochastic simulator may have broad applications. However, it is well recognized that due to the complexity of the system and the need to simultaneously process random selection of multiple parameters to accurately trace the changes in a dynamic system, a three dimensional spatially inhomogeneous stochastic simulator would be too complicated and too slow to be practically useful.